package tutorial

/**
 *
 * zhu.tan@gmail.com
 * Date: Aug 22, 2010
 */

object MinixWithConstructor {
  trait PrintMsgWhenConstructed {
    def msg: String
    println(msg)
  }
  def main(args: Array[String]) {
    val fiistAttemp = new ScalaObject with PrintMsgWhenConstructed {
      lazy val msg = "Hello   Word"        //lazy modifier is very important here as to make sure that msg will
                                           // only evaluate once and use by demand.
      println("first Attemp")
    }
    print(" ")
  }


}